package cn.roadtrip.utilmodule.util.enumpck;

public enum Enum_UserBindRoleStats {
    Active("Active", "激活"),
    Apply("Apply", "申请中"),
    DisActive("DisActive", "未激活");

    private String s;
    private String title;

    Enum_UserBindRoleStats(String s, String title) {
        this.s = s;
        this.title = title;
    }
    Enum_UserBindRoleStats(String s) {
        this.s = s;
        this.title = Enum_UserBindRoleStats.parseCode(s).getTitle();
    }

    public String getTitle() {
        return this.title;
    }

    public String getCode() {
        return this.s;
    }

    public static final Enum_UserBindRoleStats parseCode(String code) {
        switch (code) {
            case "Active":
                return Active;
            case "Apply":
                return Apply;
            case "DisActive":
                return DisActive;
        }
        return null;
    }

    @Override
    public String toString() {
        return "(code:%s, title:%s)".formatted(this.s, this.title);
    }
}
